package com.olddriver.crm.mapper;

import org.apache.ibatis.annotations.Param;
import com.olddriver.crm.domain.Employee;
import com.olddriver.crm.domain.Role;
import com.olddriver.crm.query.QueryObject;

import java.util.List;


public interface EmployeeMapper {
    int insert(@Param("employee") Employee employee);

    int update(@Param("employee") Employee employee);

    int queryTotal(QueryObject qo);

    List<Employee> queryRows(QueryObject qo);

    void updateState(@Param("state") Boolean state, @Param("id") Long id);

    void insertRelations(@Param("id") Long id, @Param("roles") List<Role> roles);

    void deleteRelations(Long id);

    List<Employee> listAll(QueryObject qo);

    Employee findEmpByUsername(String username);

    List<Employee> selectAllEmployees();

    Employee findById(Long id);
}
